Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@csstools/postcss-nested-calc

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@csstools/postcss-nested-calc

Use nested calc() expressions in CSS

  • 2.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created

What is @csstools/postcss-nested-calc?

@csstools/postcss-nested-calc is a PostCSS plugin that allows you to use nested calc() expressions in your CSS. This can simplify complex calculations and make your CSS more maintainable.

What are @csstools/postcss-nested-calc's main functionalities?

Nested calc() expressions

This feature allows you to nest calc() expressions within each other. The plugin will resolve these nested calculations into a single calc() expression.

/* Input CSS */
.example {
  width: calc(100% - calc(50px + 10px));
}

/* Output CSS */
.example {
  width: calc(100% - 60px);
}

Simplifying complex calculations

This feature simplifies complex calculations by resolving nested calc() expressions, making your CSS easier to read and maintain.

/* Input CSS */
.example {
  height: calc(100vh - calc(2 * 20px + 10px));
}

/* Output CSS */
.example {
  height: calc(100vh - 50px);
}

Other packages similar to @csstools/postcss-nested-calc

Keywords

FAQs

Package last updated on 09 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc